package org.itboys.mobile.entity.mysql.order;

import org.itboys.mongodb.entity.BaseMySqlEntity;

import java.math.BigDecimal;

/**
 * 作者：jiangxiong
 * 日期：2016年11月25日
 * 联系方式 ：empty90911@126.com
 * 描述：农厨_订单_商品_实体
 */
public class SundayOrderProduct extends BaseMySqlEntity {
    private Long orderId;//订单id
    private Long productId;//产品Id
    private String name;//产品名称
    private String barCode;//编码
    private String image;//产品主图
    private Integer num;//数量
    private Integer store;//下单时的库存
    private String standard;//规格
    private Integer status;//状态
    private BigDecimal price;//价格
    private Integer type;//类型。
    private BigDecimal tax;//关税
    private String taxMsg;//关税、发货地等说明

    public SundayOrderProduct() {
    }

    public SundayOrderProduct(Long orderId, Long productId, String name, String barCode, String image, Integer num,Integer store,String standard, Integer status,  BigDecimal price, Integer type) {
        this.orderId = orderId;
        this.productId = productId;
        this.name = name;
        this.barCode = barCode;
        this.image = image;
        this.num = num;
        this.store=store;
        this.standard = standard;
        this.status = status;
        this.price = price;
        this.type = type;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBarCode() {
        return barCode;
    }

    public void setBarCode(String barCode) {
        this.barCode = barCode;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getStore() {
        return store;
    }

    public void setStore(Integer store) {
        this.store = store;
    }

    public String getStandard() {
        return standard;
    }

    public void setStandard(String standard) {
        this.standard = standard;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public BigDecimal getTax() {
        return tax;
    }

    public void setTax(BigDecimal tax) {
        this.tax = tax;
    }

    public String getTaxMsg() {
        return taxMsg;
    }

    public void setTaxMsg(String taxMsg) {
        this.taxMsg = taxMsg;
    }

    public BigDecimal getTotalPrice(){
        Integer num = 0;
        BigDecimal price = new BigDecimal(0);
        if(this.num != null){
            num = this.num;
        }
        if(this.price != null){
            price = this.price;
        }
        return price.multiply(new BigDecimal(num));
    }
}
